<template>
<div class="common-layout">
       <el-container style="width:100%; height: 100%; border: 1px solid #eee;">
    <el-aside width="200px" style="background-color: rgb(238, 241, 246);text-align:left;">
      <el-menu :default-openeds="['1', '3']">
          <img src="../assets/logo.png" style="width:180px;">
          <el-menu-item index="0">
              <i class="el-icon-odometer"></i>仪表盘</el-menu-item>
        <el-sub-menu index="1">
          <template #title><i class="el-icon-menu"></i>常用设置</template>
          <el-menu-item-group>
            <el-menu-item index="1-1">教师管理</el-menu-item>
            <el-menu-item index="1-2">学生管理</el-menu-item>
            <el-menu-item index="1-3">公告管理</el-menu-item>
            <el-menu-item index="1-4">系统配置</el-menu-item>
            <el-menu-item index="1-5">判题服务器</el-menu-item>
          </el-menu-item-group>
        </el-sub-menu>

        <el-sub-menu index="2">  
          <template #title><i class="el-icon-aim"></i>问题</template>
          <el-menu-item-group>
            <el-menu-item index="2-1">问题列表</el-menu-item>
            <el-menu-item index="2-2">增加题目</el-menu-item>
            <el-menu-item index="2-3">导入导出题目</el-menu-item>
          </el-menu-item-group> 
        </el-sub-menu>

        <el-sub-menu index="3">
          <template #title><i class="el-icon-trophy"></i>比赛&练习</template>
         <el-menu-item-group>
            <el-menu-item index="3-1">比赛列表</el-menu-item>
            <el-menu-item index="3-2">创建比赛</el-menu-item>
          </el-menu-item-group>
        </el-sub-menu>

        <el-sub-menu index="4">
          <template #title><i class="el-icon-collection"></i>课程</template>
        <el-menu-item-group>
            <el-menu-item index="4-1">课程列表</el-menu-item>
            <el-menu-item index="4-2">创建课程</el-menu-item>
          </el-menu-item-group>
        </el-sub-menu>
      </el-menu>
    </el-aside>

    <el-container>
      
      <el-header style="background-color:#F9FAFC;text-align: right; font-size: 12px;">
           <i class="el-icon-search" style="margin-right: 15px"></i>
          <i class="el-icon-share" style="margin-right: 15px"></i>
        <el-dropdown>
           <span class="el-dropdown-link">
          username<i class="el-icon-arrow-down el-icon--right"></i>
        </span>
        <template #dropdown>
          <el-dropdown-menu>
            <el-dropdown-item>logout</el-dropdown-item>
          </el-dropdown-menu>
        </template>
      </el-dropdown>
      </el-header>

      <el-main style="background-color:#EDECEC;"> 
        <el-card class="box-card">
            <template #header>
            <div class="card-header">
                <p>标题</p>
            </div>
            </template>
            <div v-for="o in 1" :key="o" class="text item">{{ '主题内容 '  }}</div> 
        </el-card>
      </el-main>
       <el-footer style="background-color:#EDECEC;">Build Version:20210920bd</el-footer>
    </el-container>
  </el-container>
      </div>
</template>

<script>
import { defineComponent, ref,h } from 'vue'
import { ElMessage } from 'element-plus'


export default defineComponent({
  
    props:{
      outdata:{
        mess:String,
        default:''
      }
    },
    data(){
      return{

      }
    },

   setup() {
     const open = () => {
      ElMessage('版权所有，不可侵权，联系方式XXXX')
     }
      const openVn = () => {
      ElMessage({
        message: h('p', null, [
          h('span', null, 'Message can be '),
          h('i', { style: 'color: teal' }, 'VNode'),
        ]),
      })
    }
    const item = {
      date: '2016-05-02',
      name: 'Tom',
      address: 'No. 189, Grove St, Los Angeles',
    }
    const tableData = ref(Array(20).fill(item))

    return {
      tableData,
        open,
      openVn,
    }
     
   }
})
</script>

<style>
.time {
  font-size: 13px;
  color: #999;
}

.bottom {
  margin-top: 13px;
  line-height: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.el-header,
.el-footer {
  background-color: #b3c0d1;
  color: var(--el-text-color-primary);
  text-align: center;
  line-height: 60px;
}

.el-aside {
  background-color: #d3dce6;
  color: var(--el-text-color-primary);
  text-align: center;
  line-height: 200px;
}

.el-main {
  background-color: #e9eef3;
  color: var(--el-text-color-primary);
  text-align: center;
  line-height: 160px;
}

body > .el-container {
  margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
} 
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 10px;
}

.text {
  font-size: 14px;
}

.item {
  margin-bottom: 18px;
}

.box-card {
  width: 100%;
}
</style>